﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>bingoJS {{text bingo.version + ' ' + (bingo.isAFrame?"A":"T") /}}</title>
    <link href="demo/style.css" rel="stylesheet" />
</head>
<body>
    <div id="bingo_app">
        <script type="text/html">
            {{view name="main" app="demo" /}}
            bingoJS {{text bingo.version + ' ' + (bingo.isAFrame?"A":"T") /}}
            <div>Github: <a href="https://github.com/guless/bingoJS2" target="_blank">https://github.com/guless/bingoJS2</a></div>
            <div>文档: <a href="http://bingojs2.mydoc.io/" target="_blank">http://bingojs2.mydoc.io/</a></div>
            {{splice title="测试" /}}
            {{content}}

            <ul>
                <li><a href="./jasmine/core.html" target="_blank">内核单元测试， 是否支持您的浏览器</a></li>
                <li><a href="./jasmine/mv.html" target="_blank">MV单元测试， 是否支持您的浏览器</a></li>

                <li><a href="./demo/base.html" target="_blank">基础测试，默认指令(command), 元素属性绑定</a></li>
                <li><a href="./demo/views.html" target="_blank">view测试, view层级关系，view的事件</a></li>
                <li><a href="./demo/service.html" target="_blank">服务, 服务相关的测试</a></li>
            </ul>

            {{/content}}

            {{splice title="demo" /}}
            {{content}}

            <ul>
                <li><a href="./demo/box.html" target="_blank">box动画， 演示绑定与编译性能</a></li>
                <li><a href="./demo/rain.html" target="_blank">黑客帝国文字下落， 演示绑定与编译性能</a></li>
                <li><a href="./weui/example/index.html" target="_blank">WeUI, 使用bingoJS重新组织weiui</a></li>
            </ul>

            {{/content}}
            {{splice title="文档demo" /}}
            {{content}}

            <ul>
                <li><a href="./demo/boot.html" target="_blank">启动</a></li>
                <li><a href="./demo/tmpl.html" target="_blank">模板(tmpl)</a></li>
                <li><a href="./demo/command.html" target="_blank">指令(command)</a></li>
                <li><a href="./demo/attr.html" target="_blank">属性(attr)</a></li>
            </ul>

            {{/content}}
        </script>
    </div>
    <script src="./scripts/bingo2/bingo.js"></script>
    <script src="./demo/route.js"></script>
    <script type="text/javascript">
        (function () {
            var app = demoApp;

            app.command('splice', function (cp) {
                cp.$tmpl(function () {
                    return '<div class="splice">' + cp.$attrs.$getAttr('title') + '==============================</div>';
                });
            });

            app.command('content', function (cp) {
                cp.$tmpl(function () {
                    return '<div class="content">' + cp.$contents + '</div>';
                });
            });

        })();

        
        bingo.ready(function () {
            console.time('boot');
            //处理title
            bingo.compile(document.querySelector('head>title'));
            //console.profile('boot');
            bingo.compile(document.getElementById('bingo_app')).then(function () {
                //console.profileEnd('boot');
                console.timeEnd('boot');
            });
        });

    </script>
</body>
</html>
